//
//  UIView+frame.m
//  彩票
//
//  Created by mac on 15/11/2.
//  Copyright (c) 2015年 tz. All rights reserved.
//

#import "UIView+frame.h"

@implementation UIView (Frame)

- (void)setX:(CGFloat)X {
    CGRect rect = self.frame;
    rect.origin.x = X;
    self.frame = rect;
}
- (CGFloat)X {
    return self.frame.origin.x;
}


- (void)setY:(CGFloat)Y {
    CGRect rect = self.frame;
    rect.origin.y = Y;
    self.frame = rect;
}
- (CGFloat)Y {
    return self.frame.origin.y;
}


- (void)setW:(CGFloat)W {
    CGRect rect = self.frame;
    rect.size.width = W;
    self.frame = rect;
}
- (CGFloat)W {
    return self.frame.size.width;
}


-(void)setH:(CGFloat)H {
    CGRect rect = self.frame;
    rect.size.height = H;
    self.frame = rect;
}
- (CGFloat)H {
    return self.frame.size.height;
}
@end
